package com.open.web.base;

import com.open.basic.BasePageRequest;
import com.open.basic.BaseResponse;
import com.open.basic.PageResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author: codex
 * @Date: 2025/1/20 下午4:33
 * @Version: V1.0
 * @description: |
 */

// @Schema(title = "base Controller", description = "base Controller")
@Tag(name = "base Controller",description = "base Controller")
@RestController
public class BaseController {

    /**
     * 新增 建议返回新增的对象ID
     * @param object
     * @return
     */
    @PostMapping("/add")
    // @Schema(description = "新增", title = "新增")
    @Operation(description = "新增", summary = "新增summary")
    public BaseResponse<String> addXXX(Object object){
        return BaseResponse.success();
    }

    /**
     * 修改 建议返回修改对象ID
     * @param object
     * @return
     */
    @PostMapping("/update")
    @Schema(description = "修改", title = "修改")
    public BaseResponse<String> updateXXX(Object object){
        return BaseResponse.success();
    }


    @PostMapping("/deleteById")
    @Schema(description = "删除", title = "删除")
    public BaseResponse<String> deleteById(Long id){
        return BaseResponse.success();
    }

    @GetMapping("/getById")
    @Schema(description = "getById", title = "getById")
    public BaseResponse<String> getById(Long id){
        return BaseResponse.success();
    }

    @PostMapping("/page")
    @Schema(description = "分页查询", title = "分页查询")
    public BaseResponse<String> pageXXX(BasePageRequest basePageRequest){
        return PageResponse.success();
    }
}
